Computer vision system that provides information relative to animal wellness

ABSTRACT

A computer vision system includes a camera that captures a plurality of image frames in a target field. A user interface is coupled to the camera. The user interface is configured to perform accelerated parallel computations in real-time on the plurality of image frames acquired by the camera. The system detects and tracks animal wellness.

BACKGROUND Field of the Invention

This invention relates to computer vision, and more particularly, tocomputer vision systems that provides information regarding animalwellness.

Description of the Related Art

The video captured by a camera is usually streamed and hence, lacksprivacy. The video stream and camera parameters are used to detectpeople and relay infield coordinates. Camera parameters include but arenot limited to: Camera height, angle of the camera via the y axis andthe ground, taking image data and make sense of the camera data nomatter how it is set up, and the like.

The external camera parameters are different for each image. They aregiven by:

T=(Tx, Ty, Tz) the position of the camera projection center in worldcoordinate system.

R the rotation matrix that defines the camera orientation with angles ω,φ, κ (PATB convention.)

$\begin{matrix}\begin{matrix}{R = {{R_{x}(\omega)}{R_{y}(\phi)}{R_{z}(\kappa)}}} \\{= {\begin{pmatrix}1 & 0 & 0 \\0 & {\cos(\omega)} & {- {\sin(\omega)}} \\0 & {\sin(\omega)} & {\cos(\omega)}\end{pmatrix}\begin{pmatrix}{\cos(\phi)} & 0 & {\sin(\phi)} \\0 & 1 & 0 \\{- {\sin(\phi)}} & 0 & {\cos(\phi)}\end{pmatrix}}} \\{\begin{pmatrix}{\cos(\kappa)} & {- {\sin(\kappa)}} & 0 \\{\sin(\kappa)} & {\cos(\kappa)} & 0 \\0 & 0 & 1\end{pmatrix}} \\{= \begin{pmatrix}{\cos\;\kappa\;\cos\;\phi} & {{- \sin}\;\kappa\;\cos\;\phi} & {\sin\;\phi} \\\begin{matrix}{{\cos\;\kappa\;\sin\;\omega\;\sin\;\phi} +} \\{\sin\;\kappa\;\cos\;\omega}\end{matrix} & \begin{matrix}{{\cos\;\kappa\;\cos\;\omega} -} \\{\sin\;\kappa\;\sin\;\omega\;\sin\;\phi}\end{matrix} & {{- \sin}\;\omega\;\cos\;\phi} \\\begin{matrix}{{\sin\;\kappa\;\sin\;\omega} -} \\{\cos\;\kappa\;\cos\;\omega\;\sin\;\phi}\end{matrix} & \begin{matrix}{{\sin\;\kappa\;\cos\;\omega\;\sin\;\phi} +} \\{\cos\;\kappa\;\sin\;\omega}\end{matrix} & {\cos\;\omega\;\cos\;\phi}\end{pmatrix}}\end{matrix} & (1)\end{matrix}$

If X=(X, Y, Z) is a 3D point in world coordinate system, its positionX′=(X′, Y′, Z′) in camera coordinate system is given by:X′=R ^(T)(X−T)  (2)

A camera without a distortion model is given as follows:

The pixel coordinate (xu, yu) of the 3D point projection withoutdistortion model is given by:

$\begin{matrix}{\begin{pmatrix}x_{u} \\y_{u}\end{pmatrix} = {{- \begin{pmatrix}\frac{f\; X^{\prime}}{Z^{\prime}} \\\frac{f\; Y^{\prime}}{Z^{\prime}}\end{pmatrix}} + \begin{pmatrix}c_{x} \\c_{y}\end{pmatrix}}} & (3)\end{matrix}$

Where f is the focal length in pixel, and (cx, cy) the principal pointin pixel coordinates.

Camera with Distortion Model

A camera with a distortion model is as follows:

Let:

$\begin{matrix}{\begin{pmatrix}x_{h} \\y_{h}\end{pmatrix} = \begin{pmatrix}\frac{X^{\prime}}{Z^{\prime}} \\\frac{Y^{\prime}}{Z^{\prime}}\end{pmatrix}} & (4)\end{matrix}$

be the homogeneous point,r ² =x _(h) ² +y _(h) ²  (5)the squared 2D radius from the optical center, R1, R2, R3 the radial andT1, T2 the tangential distortion coefficients. The distorted homogeneouspoint in camera coordinate system (xhd, yhd) is given by:

$\begin{matrix}{\begin{pmatrix}x_{hd} \\y_{hd}\end{pmatrix} = \begin{pmatrix}{{( {1 + {R_{1}r^{2}} + {R_{2}r^{4}} + {R_{3}r^{5}}} )x_{h}} + {2T_{1}x_{h}y_{h}} + {T_{2}( {r^{2} + {2( x_{h} )^{2}}} )}} \\{{( {1 + {R_{1}r^{2}} + {R_{2}r^{4}} + {R_{3}r^{5}}} )y_{h}} + {2T_{2}x_{h}y_{h}} + {T_{1}( {r^{2} + {2( y_{h} )^{2}}} )}}\end{pmatrix}} & (6)\end{matrix}$

The pixel coordinate (xd, yd) of the 3D point projection with distortionmodel is given by:

$\begin{matrix}{\begin{pmatrix}x_{d} \\y_{d}\end{pmatrix} = {{- \begin{pmatrix}{f\; x_{hd}} \\{f\; y_{hd}}\end{pmatrix}} + \begin{pmatrix}c_{x} \\c_{y}\end{pmatrix}}} & (7)\end{matrix}$

Where f is the focal length in pixel, and (cx, cy) the principal pointin pixel coordinates.

Fisheye Lens

The distortion for a fisheye lens is defined by:

The parameters C, D, E, F that describe an affine deformation of thecircular image in pixel coordinates.

The diagonal elements of the affine matrix can be related to the focallength f:

$\begin{matrix}{f = \frac{2C}{\pi}} & (8)\end{matrix}$

The off-diagonal elements are connected to the distortion of theprojected image circle, which, in the most general case, can be arotated ellipse.

The coefficients p2, p3, p4 of a polynomial:ρ=θ+p ₂θ² +p ₂θ³ +p ₄θ⁴  (9)

Where:

$\begin{matrix}{{\theta = {\frac{2}{\pi}{\arctan( \frac{\sqrt{X^{\prime\; 2} + Y^{\prime 2}}}{Z^{\prime}} )}}};{\theta \in \lbrack {0,{1\lbrack}} }} & (10)\end{matrix}$

The pixel coordinate (xd, yd) of the 3D point projection with a fisheyedistortion model is given by:

$\begin{matrix}{\begin{pmatrix}x_{d} \\y_{d}\end{pmatrix} = {{\begin{pmatrix}C & D \\E & F\end{pmatrix}\begin{pmatrix}x_{h} \\y_{h}\end{pmatrix}} + \begin{pmatrix}c_{x} \\c_{y}\end{pmatrix}}} & (11)\end{matrix}$

Where:

$\begin{matrix}{\begin{pmatrix}x_{h} \\y_{h}\end{pmatrix} = \begin{pmatrix}\frac{\rho\; X^{\prime}}{\sqrt{X^{\prime\; 2} + Y^{\prime\; 2}}} \\\frac{\rho\; Y^{\prime}}{\sqrt{X^{\prime\; 2} + Y^{\prime\; 2}}}\end{pmatrix}} & (12)\end{matrix}$

And (cx, cy) is the principal point in pixel coordinates.

Camera Rig External Parameters

A camera rig consists of multiple cameras that are connected togetherwith geometric constraints. A camera rig has the followingcharacteristics:

One camera is taken as reference (master) camera with a given positionTm, and orientation Rm in world coordinates.

All the other cameras are secondary cameras with position Ts andorientation Rs in world coordinates.

For each secondary camera, the relative translation Trel and rotationRrel with respect to the reference camera is known.

The position and orientation for secondary rig cameras are definedw.r.t. the reference (master) camera such that:T _(s) =T _(m) +R _(m) T _(rel)  (13)R _(s) =R _(m) R _(rel)  (14)

The position X′ of a 3D point in the reference (master) cameracoordinate system is given by:X′=R _(m) ^(T)(X−T _(m))  (15)

The position X′ of a 3D point in the coordinate system of a secondarycamera is given by:X′=R _(rel) ^(T)[R _(m) ^(T)(X−T _(m))−T _(rel)]  (16)

Once the 3D point in camera coordinates is calculated, the projectionworks in the same way as for any other camera

There is a need to provide an improved computer vision detection system.

SUMMARY

An object of the present invention is to provide a computer visionsystem with a wherein the system detects and tracks animal wellness.

Another object of the present invention is to provide a computer visionsystem that detects and tracts animal habitat.

A further object of the present invention is to provide a computervision system that detects and tracts animal intervention design.

Yet another object of the present invention is to provide a computervision system that detects animal health and safety.

Still another object of the present invention is to provide a computervision system that detects animal evacuation routes.

A further object of the present invention is to provide a computervision system that detects animal evacuation assuredness.

Yet another object of the present invention is to provide a computervision system that detects animal responder wayfinding.

These and other objects of the present invention are achieved in, acomputer vision system. A camera captures a plurality of image frames ina target field. A user interface is coupled to the camera. The userinterface is configured to perform accelerated parallel computations inreal-time on the plurality of image frames acquired by the camera. Thesystem detects and tracks animal wellness.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates one embodiment of a computer vision system of thepresent invention.

FIG. 2 illustrates one embodiment of a computer vision system of thepresent invention illustrating a camera's field of view

FIG. 3 is a flow chart that illustrates one embodiment of an applicationof the computer vision system of the present invention, where a segmentof python computer code in the system is dedicated to relaying the logfiles, both data and error, to the server, and this code segment deletesthe local copy of the files once they have been posted to the server.

FIG. 4 is a flow chart that of the present invention where blocks ofcode that are scheduled to run at specified times or intervals (alsoknown as “cronjobs”) run periodically every minute to confirm that allscripts are executing as desired and to restart any script that is notexecuting as desired.

FIG. 5 illustrates one embodiment of the present invention where a fieldof view is monitored.

FIG. 6 is a flow chart that illustrates one embodiment of an applicationof the computer vision system of the present invention, where the systemsoftware code runs multiple concurrent threads, each performing a singletask.

FIG. 7 illustrates one embodiment of the present invention wheredifferent zones can overlay as different layers.

DETAILED DESCRIPTION

In one embodiment, illustrated in FIG. 1, a computer vision system 10 isprovided. In one embodiment system 10 uses a processor 13 to performaccelerated parallel computations in real-time on a series of imageframes acquired by a camera 14 coupled to it. In one embodiment system10 anonymously detects and tracks people within a target field that iscaptured by the camera 14, FIG. 2. In one embodiment, system 10 includesuser interface 38, a processor 13, camera 14, LED 22 which can provideRGB status indication, extended USB ports 15, housing with wall mountingbrackets, an external power supply 17, cellular-to-ethernet conversionrouter 21, external USB expansion hub 23, and pre-loaded softwareexecuted on a Nvidia Jetson TX2 embedded platform 25. System 10 does notstream unmodified/complete video, as more fully set forth hereafter. Inone embodiment system 10 is coupled to a cloud server 20, includes adatabase 26, and a SIM card USB 27.

As a non-limiting example, system 10 can include: a Nvidia Jetson TX2embedded platform 25 which features an NVIDIA Pascal™ Architectureprocessor 13, 2 Denver 64-bit CPUs, 8 GB RAM, Connectivity to 802.11acWi-Fi, Bluetooth-Enabled Devices, and 10/100/1000BASE-T Ethernet, asingle USB3 Type A port, GPIO (General Purpose Input Output) stack, andmany more peripherals. In one embodiment the board comes with anexternal AC Adapter, which as a non-limiting example can be 19V.

In one embodiment due to lack of enough USB Type A ports on the Nvidiaembedded board 25, the system 10 uses an external USB expansion hub 23to connect a USB camera 14 that serves as the source of input to thesystem 10, and to power the cellular-to-ethernet router 21. The additionof the external USB expansion hub 23 makes it possible for the system 10to use cellular network as its means to connect to the internet andcommunicate with the server 20. If absent, the system can communicateonly through Wi-Fi or LAN.

In order to convey system status to the user the processor 13 has anembedded board with a “Status LED”, that has been programmed to reflectthe functioning of system 10 through specific color codes. The statusLED visually confirms that the system 10 is up and running as desired,diagnoses sources of malfunction, and indicates the cause(s) via theLEDs. The status LED is programmed to indicate any change in system 19state almost instantly.

In one embodiment router 21 converts cellular network to Ethernet. Thesystem connects to its server 20 through cellular network, therebyaugmenting the board's native ability to connect to the internet viaWi-Fi or ethernet with the ability to connect via a cellular network.

In one embodiment system 10 relies on an open source fully convolutedneural network, YOLOv2, for detecting objects of class “people” withinan image and uses a proximity-based tracking algorithm to track peopleacross image frames. In one embodiment system 10 builds on top of opensource. As a non-limiting example system 10 uses a YOLOv2 model that isopen source neural network written in C and CUDA.

In one embodiment the computer vision system includes: a digital videocamera 14 that captures a plurality of image frames of a target field ofview. Processor 13 is coupled to the camera 14. Processor 13 configuredto perform accelerated parallel computations in real-time on theplurality of image frames acquired by the camera 14 and relay theoutputs of those computations to a database on a set of servers 20,where the database 19 is connected to a web accessible user interface 38which allows users to view and interact with the data as well as adddata and information that is stored in the database and visualized viathe interface.

The video feed captured by the camera 14 and relayed to the processorfor processing and automated analysis but the video feed is never storedin system 10. The images are processed in real time and data regardingthe space and its occupants is extracted, and the next frames of thevideo overwrite those frames that were just processed. Only the dataextracted from each frame is stored locally and/or relayed to the systemservers 20.

As a non-limiting example, system 10 does not store the video butprocesses images from the monitored field and stores only the elementsof the processed image that are relevant to the deployment. Not storingthe video allows the user to create a reduced or redacted re-creation ofthe event, activities and environment originally captured by the camera14, with only the elements of interest remaining. In one embodiment,this reduced/redacted data is stored for analysis, processed into areduced/redacted image.

As a non-limiting example, the reduced/redacted re-creation of the eventis stored on the server 20, which may be on client premises, in a publicor private cloud, or on a system server 20. As a non-limiting example,it is accessible for replay or near real time streaming on one or moreof: a desktop, connected mobile device, wearable, including but notlimited to heads up and immersive displays, and the like.

In one embodiment the reduced/redacted data is processed and played backto create a reduced/redacted video or a reduced/redacted immersiveenvironment. As a non-limiting example, system 10 processing is used tocapture space use and activity data using passive cameras 14 whilemaintaining privacy and security of occupants.

In one embodiment, in use during always on camera 14 monitoring forspecific event detection, is used to conform with EU “right to beforgotten” legislation while maintaining constant video surveillance. Asa non-limiting example system 10 processing is used in near real timefor the reduction of excessive stimuli for individuals who need to focuson and/or identify specific phenomena or details.

As a non-limiting example, system 10 the processing of images from themonitored field and storage of only those elements of the processedimage that are relevant to the deployment can be used in at least oneof: wellness/mindfulness/and stress reduction, by allowing a user tointeract with the world with selected or non selected stimuli removed orreduced.

In one embodiment the software used in system 10 has two parentprocesses running concurrently. The first one detects, locates andtracks people in the camera's field of view. The second one relays thisdata to the server 20 over the internet. The following describes howeach of these parent processes are unique to the system.

In one embodiment data collection of system 10 draws upon the opensource real-time object detection algorithm, YOLOv2, converted to C++programming language from its original C version to supportobject-oriented programming. Significant syntax changes and librarylinking issues were resolved in multiple functions and files to achievethis.

YOLOv2 is only capable of detecting objects in an image. In oneembodiment, system 10 tracks objects detected by YOLOv2 and exploits theObject-Oriented feature supported only by the modified version of YOLOv2in C++. Tracking of people within the target field (camera's view) isdone based on shortest distance-based association, another open sourcetechnique. The tracking IDs are randomly generated and associated withthe people in the field, thus preserving their anonymity.

System 10 provides data logging. Pixel location coordinates of thedetected people within the target field (camera's view), along withtheir unique tracking IDs are logged with timestamps in files that arestored locally in on-board memory. The files are preserved until theircontents have been successfully transmitted to the server 20.

In one embodiment a timestamped error logging is added to system 10 toallow the user to understand the source of an error and perform requiredmeasures to fix them.

In one embodiment, illustrated in FIG. 3, a python script running on theprocessor 13 in the system 10 is dedicated to relaying the log files,both data and error, to the server 20. The script deletes the local copyof the files once they have been posted to the server 20. This frees upmemory while preventing data loss. The script indicates its successfulexecution by turning on the BLUE color of the status LED. In case of anerror during the uploading process, the script turns off the BLUE colorof the status LED, logs the cause for the malfunction, and continuouslyretries until the log files have been successfully transferred to theserver.

In one embodiment the data relay script has a child thread thatperiodically checks for an image capture command from the user. If theuser issues an image capture command from the user interface 12, thesystem 10 sets appropriate flags alerting the data collection script tosave the current frame of the camera view. Once the data collectionscript confirms a successful frame capture, the system 10 relays theimage frame to the server 20 where it is saved. Upon the successfulcompletion of the transfer, the system 10 updates the local flags,alerts the server 20 of the completion of the operation, and deletes thelocal copy of the image frame. The user can interact with the userinterface 12 to access the image. If there is a failure in imagetransfer, the system 10 logs the cause for malfunction and attempts tore-transmit the image until it is successful.

In one embodiment a memory management script runs parallel to the datacollection and relay scripts that periodically checks the system 10 formemory overflows. Log files (data and error) keep growing if the systemhas no access to the internet to post the data to the server. If theuser fails to intervene and fix the issue, the system 10 runs out ofmemory and soon stops functioning. To prevent this from happening, amemory management script periodically checks the available systemmemory. If the available memory dips below a certain number, which as anon-limiting example can be 0.5 Gb, the script deletes the most historicdata log files until the total free space is over, as a non-limitingexample 0.5 GB. This ensures that the system 10 has sufficient memory tokeep functioning as desired.

Referring to FIG. 4, in one embodiment the system 10 is configured withcron, a time-based job scheduler. The cron has jobs, called cronjobs, toensure that all the scripts are up and running. These cronjobs runperiodically every minute and restart any script that is not executingas desired. The system is designed to execute the cronjobs upon boot.

The processor 13 executes various algorithms, including but not limitedto, the modified version of YOLOv2 in C++ that provides a detectionmodel for detecting people, proximity-based tracking (open source),memory management algorithm and the like.

In this case, the system 10 grabs a single image frame from the camera14 and saves it locally until it is transmitted to the user after whichthe local copy is deleted. This feature of the system 10 allows the userto be aware of the target field 16 that is being monitored and adjustthe camera's 14 position if necessary, FIG. 5.

In one embodiment processor 13 is used to render 3D graphics. As anon-limiting example user interface 12 performs floating pointoperations (as opposed to integer calculations). This specialized designenables processor 13 to render graphics more efficiently than even thefastest CPUs.

In one embodiment processor 13 uses transistors to do calculationsrelated to 3D computer graphics. In addition to the 3D hardware, userinterface 38 can include basic 2D acceleration and framebuffercapabilities.

Because YOLOv2 is an object detection neural network, not a recognitionmethod, and the tracking is purely based on the position of peopleacross frames, the system 10 protects the identity of the people in thetarget field 16. Additionally, the system 10 performs all thecomputations in real-time and on-site. No image or video is storedlocally or on the cloud unless the user specifically requests the systemfor a single frame view of the target field 16.

This request is made through a physical interaction with the system userinterface 12. When this happens, the system 10 grabs a single imageframe from the camera 14 and saves it locally until it is uploaded tothe server 20. Once the system 10 confirms that the image is stored inthe secure server 20, it automatically deletes the local copy. The imageis made available to the user in the system user interface 12. Thisfeature of the system 10 allows the user to be aware of the target field16 that is being monitored and adjust the camera's 14 position ifnecessary or create overlays and boundaries on the latest field of view16.

In one embodiment system 10 detects, locates and tracks people in thecamera's field of view 16 in 2-D pixel coordinate format (X, Y) andsends this information, along with the tracking identifiers assigned toeach detection, to the system server 20. The server 20 processes thisdata and calculates statistics including but not limited to: occupantdensity, common movement pathways and trajectories, areas and durationof dwell and motion, and the like. The user can interact with thesystem's user interface 12 remotely to generate reports andvisualizations that can help them audit the asset under inspection.

In one embodiment system 10 builds on top of open source. As anon-limiting example system 10 uses a YOLOv2 model that is open sourceneural network written in C and CUDA.

In one embodiment a modification of YOLOv2 is used. The user interface12 provided by the system is instrumental in delivering differentvisualizations, statistics, and linking pixel data to the physicalspace.

Via the user interface 12, a reference object in the field of view isselected, and the dimensions of each side is then determined. Thedimensions of the object are initially input by the user. But thegrid-square size is not limited to this dimension—it can be customized.

The reference object is selected by the user using the system's userinterface 12. The user inputs the dimensions of each side of thereference object. Then a grid is overlaid upon the static image. Thisgrid is composed of grid squares (just like a chessboard) withdimensions (length and width) that match the actual size of thereference object, though the on-screen dimensions of the grid squareswill/may vary due to the perspective effect from the camera angle. Theuser can expand or reduce the number of grid squares, while keeping itsdimensions constant, using the UI. The user may also sub-divide the gridinto smaller grid squares and the system will automatically/dynamicallycompute the new dimensions of each grid-square. (application: to createprecise physical zones in the camera view), which provides a tracking ofpeople. Once the grid is finalized, the UI will then have enoughinformation to relate pixel locations of people into their plausiblelocations in the real-world frame.

Another application of this grid is to compute the distance between twopoints selected by the user in the image frame using the dimension of asingle grid square. The system computes the final size of each gridsquare based on the initial input from the user about the referenceobject. It can then use this calculation to derive the physical distancebetween two points set buy the user in the static image using the userinterface 12.

The system 10 enhances security, does not do streaming, and the camerain focus details is not important.

System 10 only has a static image, and creates user interface 12. Fromthis a reference object is selected, and a distance for each side isinput by the user using user interface 12. System 10 adds a layer ofgrid-squares to the reference image where each grid square has the samedimensions as the reference object selected by the user. The user maycustomize the number of gridlines segmenting the camera view, thetracking of people, and system 10 will dynamically compute the newdimensions of each grid-square.

The number of pixels in each grid square will vary, but the actualphysical space represented by the grid-squares remains constant eventhough the grid-squares might appear to be skewed in the camera view dueto its deployment. System performs calculations to determine a dynamicrelationship between the on-screen pixel locations and actual locationsin the physical space. These calculations can relate the motion of aperson in 2D image to their movement in 3D physical space. As a personbegins to move in the camera's view 16, system 10 knows where the personmoves in the real-world space despite the image distortion caused byperspective.

In one embodiment a physical change is made to hardware components ofsystem 10. In one embodiment, when an action is taken there is aphysical change to one or more of: circuits; power sources, relays;change the way a device transmits images, radio power systems, and thelike.

Database 19 periodically monitors system 10 for data relay. If database19 fails to receive data from system 10 in over 24 hours or after acustomized period of time as set by the user, database 19 notifies theuser via email and/or text message. The user may verify if system 10 isactive and online using the status LED attached to it and interveneaccordingly.

User interface 12 allows the user to interact with system 10 remotelythrough a virtual button that captures the camera view. System 10streams the static image to user interface 12 and provides the user witha visualization of the field that system 10 is analyzing.

As a non-limiting example, system 10 uses processor 13 to perform anaccelerated parallel computation in real-time on a series of imageframes acquired by the camera 14. The system 10 is capable ofanonymously detecting and tracking people within a target field that iscaptured by the camera 14. In one embodiment the system 10 relies on anopen source fully convoluted neural network, which as a non-limitingexample is YOLOv2, for detecting objects of class, including but notlimited to, “people” within an image and uses a proximity-based trackingalgorithm to track people across image frames. As a non-limitingexample, cartesian pixel coordinates of people are detected in a fieldof view 16 along with unique numeric identifiers that are assigned totrack each individual within the field of view 16, and relays theinformation to the server 20, which can be cloud based. As anon-limiting example, the data is translated from a 2-dimensional cameraplane into 3-dimensional physical locations.

As a non-limiting example this can be achieved by first grabbing animage from the camera 14, and then running a classification algorithm onthe image.

In one embodiment, tracking is added to the YOLO code. As a non-limitingexample this can be achieved by sending it to an existing algorithm Yv,people are then detected in the image and tracking of the person is thenadded in the space. As a non-limiting example, it combines differentopen source codes in order to do the tracking; each person is detectedin a bounding box. this is done by YOLO code; the x and y center of thebox, the height and width of the box is provided by YOLO,

Referring to FIG. 6, in one embodiment the system software code runsmultiple concurrent threads, each performing a single task. Thealgorithm responsible for detecting and tracking people executesindependently of the algorithm that relays the data to the server 20.This ensures that a break in one section doesn't affect the rest of thesystem 10, and makes the system 10 resistant to complete failure. Thesystem 10 periodically checks to determine if all the software code isexecuting as desired at a minute resolution using cronjobs. The system10 ensures that any errors encountered by it are recorded withtimestamps so that system administrator is aware of the source ofmalfunction and may promptly intervene as required.

In addition, there is a LED 22, that can be a multi-color LED 22,attached to the system 10 whose color reflects the system's state,alerting the user of any malfunction. System 10 also monitors the amountof available memory and deletes data files that are no longer of use

In one embodiment LED 22 is an RGB LED that is interfaced with a Nvidiaboard to indicate the status of the system 10 for the user.

As a non-limiting example, the LED's glow as follows:

a. RED only: The system 10 has successfully detected the camera and isperforming detection and tracking of people within the camera's field ofview 16. However, the system 10 lacks access to the internet or has beenunsuccessful in uploading the log files (data and error) to the server.b. BLUE only: The system 10 has successfully established access to theinternet and any attempt to upload log file (data and error) to theserver is successful. However, it has failed to detect a camera.c. MAGENTA/PINK: The system 10 has successfully detected the camera andis performing detection and tracking of people within its view. It hasalso established connection to the internet and is successfullyuploading log files (data and error) to the server.d. Toggle GREEN—Single frame screenshot of camera field of view is beingsaved as an image screenshot.e. OFF: The system 10 is experiencing total malfunction. If the system10 is powered on when this happens this indicates that the system isunable to detect the input camera source or connect to the internet.

As a non-limiting example system 10 can be used for a variety ofdifferent applications, including but not limited to: detection ofpeople and identification of their location in the field of view 16 aswell as their actual physical location in the space; identification andquantification of group formation, physical closeness of group members,each group member's duration of stay in group; identification of commonmovement pathways within a space; identification of common areas ofdwell in a space; identification of locations in which “collisions”regularly occur (two or more people coming within a defined field ofproximity, and for each collision, a record of where each party camefrom, and their paths of movement post “collision”; identification andquantification of space use at a sub room level of granularity;identification and quantification of equipment or furniture use;identification of the dimensions of a space from only a picture and auser input reference marker. The techniques and capabilities of thesystem can be applied to: space design and planning;accountability/objective measurement of impact of architecture anddesign work; chargebacks for space, equipment and furniture use;enforcing service level agreements for cleaners, service work, etc.;physical security; coaching and performance improvement (movement andpathway efficiency); quantifying service and amenity use; quantifyingreaction to advertising (dwell time, pathway adjustment etc.); animalwellness and habitat/intervention design; emergency health and safety—evacuation routes, evacuation assuredness, responder wayfinding;utilization and occupancy heatmaps, pathway tracking, and assetmanagement, for spatial auditing and the like.

As a non-limiting example, the applications mentioned above can be donein a variety of different ways, including but not limited to: fully onpremises behind a client firewall with user interface 12 locally hostedon client server; on premises processing with throttled/limitedbandwidth relay (to prevent possible streaming) to server for analysis,user interface 12 hosted on cloud server; on premises camera streamingvideo to cloud server for processing and analysis, user interface 12hosted on cloud server.

In one embodiment system 10 is used with at least one establishmentselected from: retail; the food industry; and the beverage industry.

In one embodiment system 10 is used relative to advertising costs of anestablishment.

In one embodiment system 10 provides real time information relative toan establishment's current occupancy.

In one embodiment system 10 provides near real time information relativeto an establishment's current occupancy and provides informationselected from at least one of: the ratio of an establishment's patronsto employees; the number of establishment patrons compared toestablishment inventory; and the number of people who are enteringand/or exiting an establishment.

In one embodiment system 10 identifies a condition of interest withregard to occupant count, occupant activity, occupant location, occupantratios, and/or some derivative or combination thereof and generatesinformation summarizing the identified condition.

In one embodiment system 10 sends out an alert to an establishmentdescribing the identified condition of interest e.g. that theestablishment capacity has dropped below a target capacity.

In one embodiment system 10 provides an interface through whichestablishment personnel can select from a list of a prepopulatedadvertising messages that are tied to the identified condition ofinterest, select a target recipient population based on demographics,location/proximity, historical behaviors, etc. and send the selectedadvertising campaign to the selected target recipients. System 10records the conditions, timing, responder, selected response, targetrecipients, and resulting impact on occupancy in the selected responsetime window.

In one embodiment system 10 is configured to allow an establishment torelease a geofenced advertising message.

In one embodiment system 10 prevents additional or scheduledmarketing/advertising communications based on current occupancy levels.

In one embodiment system 10 provides a determination of anestablishment's indoor and outdoor conditions.

In one embodiment system 10 is configured to provide a tie in to a pointof sale data.

In one embodiment system 10 provides an establishment with a capabilityto model the impacts of different environmental conditions on customerbehavior including, but not limited to; selection of the establishment,purchase selection, purchase volume, duration of stay, next destination.

In one embodiment system 10 provides recommendations to theestablishment regarding the environmental conditions that are mostlikely to result in specific patron, passerby and/or staff behaviors.

In one embodiment the system 10 automatically tunes the environmentalconditions in real time to establish the environmental conditions thatare most likely to result in the specified patron, passerby and/or staffbehaviors including but not limited to dwell, spend, product selection,purchase volume and/or next destination.

In one embodiment the system 10 allows an establishment to makedecisions based on knowledge of what is actually happening in anestablishment space.

In one embodiment the system 10 is configured to improve feedback modelsto an establishment.

The one embodiment the system 10 is configured to provide management ofestablishment staff and perishables.

In one embodiment system 10 is configured to provide notification topatrons or potential patrons relative how busy the establishment is.

In one embodiment the system 10 is configured to reduce anestablishment's marketing expenses.

In one embodiment the system 10 is configured to provide a moreeffective expenditure of an establishment's marketing expenses.

In one embodiment the system 10 includes environmental sensorsconfigured to help draw patrons into an establishment space.

In one embodiment the system 10 is configured to provide a real timemetric of how many patrons are at an establishment.

In one embodiment sensors provide information as to an establishment'scurrent environmental conditions.

In one embodiment the system 10 is configured to provide for anadjustment of an establishment's environmental conditions.

In one embodiment the sensors provide information relative to anestablishment current environmental and occupancy that are used foradvertisement purposes.

As a non-limiting example with the use of a user interface 12 the system10 doesn't care about the pitch of the camera 14. As long as camera 14has a good view of the target field 16 system 10 does not care about howcamera 14 is deployed. Camera 14 deployment doesn't depend on on-sitenetwork for communication with the system. The user picks the fourvertices of any object in the camera's field of view 16. This referenceobject should have four corners, pairs of parallel edges in the physicalworld which appear to be skewed in the camera's perspective, and haveknown dimensions. As a non-limiting example, a reference object 24 isany selected area of physical space within the camera's field of viewwhich is identified by the user as the standard unit of physical spacedivision to be used for analysis.

In one embodiment data, in-coming from camera 12, is protected andprivacy is maintained. In one embodiment the processing of a cameraimage is performed on-site, not in the cloud or a remote location.Instead the camera image is received at a box 26 deployed on thepremises.

In one embodiment a single image frame from the camera is taken andrelayed to the user interface via the server in order to make sure thatcamera 12 is still in line with a reference object (points) 28.

In one embodiment, a gyroscope or accelerator is at camera 12 to see ifcamera 12 has shifted from its original position from which it capturedthe initial shot that served as the camera view reference. This isbecause system 10 doesn't stream video.

System 10 does not stream video and maintains privacy but also knowsthat the refence points 28 are in the same location. As a non-limitingexample, this can be achieved through hardware, including but notlimited to: an accelerometer 30 or identification of some otherreference object or marker on a target field 16 and comparison of thecurrent detected location of the reference object/marker to the storedlocation coordinates at a set frequency, which as a non-limiting examplecan be constantly. As a non-limiting example, 6 DOF IMU (instead of anaccelerometer 30), is used to understand how the camera has moved,including but not limited to pitch, yaw, roll, x, y, z and the like.

As a non-limiting example of constantly, the system periodicallycompares the features within a user selected reference region on thestatic image using user interface 12 across frames. This referenceregion is assumed to be free of occlusions at all times. Therefore, anydifference in the pixels within the reference region constitutes achange in the camera's 14 view and position. Any change in its positionconstitutes a change in the camera's 14 position. As a non-limitingexample, the user may be alerted immediately through email, text messageand the like.

This allows the user to intervene and take action to either update theuser interface 12 with the new view of the camera 14, or revert itsposition to the old view. No video is stored anywhere at any point oftime.

In one embodiment an on-line interface 12 is provided. Interface 12includes one or more activation mechanisms, including but not limited toa button that is used to obtain a static image of what the camera 14sees. Although system 10 does not stream video, it is not blind andprovides the user with a snapshot of the camera's view through thecapture and relay of static image streamed to the server 20 upon theuser's command. The user can create custom zones 34 on the static imageusing the user interface 12. As a non-limiting example these differentzones can overlay as different layers, as illustrated in FIG. 7.

As previously mentioned, in one embodiment system 10 provides for peopledetection, relay and infield coordinates in pixels. As a non-limitingexample, the tracking of people within a space is completely anonymous.Tracking IDs are unique numeric identifiers that are generated at randomand associated with each individual detected in the camera view. Eachnew person in a field, including re-entry into the field following anexit, is assigned a new tracking ID.

The pixel coordinates can be translated to location in physical space.As a non-limiting example, using a two-point perspective representationof the reference object selected by the user, system 10 overlays a gridof definite size over the reference image where, each grid unit has thesame physical dimensions as the reference object. This grid aligns the2-D pixel coordinate space with the actual 3-D physical space. Thelocation of each pixel in the image plane can be translated intophysical locations.

The grid units can be further subdivided into more granular units toprovide a more precise location in the physical world. The system isrobust and flexible to user customizations and abstracts themathematical computations from the user, it provides the user with thefinal count of the number of grid units defining the space, and thedimensions of each grid unit. There is a lot of scope to improve thefeatures of the system, some of which include, but not limited to:

In one embodiment there is no need for a physical connection between thesource of image input and the system 10. As a non-limiting example thiscan be achieved by establishing a private local network between thecamera 14 and the system 10 to stream the video to the system 10 forprocessing. In one embodiment an internet enabled camera 14 is used thefeed from the camera 14 is fed to a remotely located system 10, or avideo file is uploaded using the system user interface 12 forprocessing.

In another embodiment an inertial measurement unit (IMU) 36 is coupledto the input camera 14 to constantly monitor its orientation andpromptly alert the user or the system administrator if there is anychange in its position. As a non-limiting example, a 6 DOF IMU can beused to measure the orientation of the camera 14 along the x, y, zplane, and its pitch, yaw and roll angles. This information is usefulduring camera installation, or in understanding the exact amount bywhich the camera 14 has moved.

In one embodiment a “view stitching” feature is added to the system 10that enables an individual system to process the video from multiplecamera sources and present it to the user as a single seamlesslystitched panoramic view of the total target field.

In one embodiment a memory management script is modified to deletealternate historic files instead of statically deleting the oldest filein the system to maintain coherence of historic data.

In one embodiment a proximity-based tracking method is shifted to apredictive tracking technique that considers the person's historicmovement pattern. This improves the tracking efficiency especially incrowded spaces with high density of collisions, crossovers, andgrouping.

It is to be understood that the present disclosure is not to be limitedto the specific examples illustrated and that modifications and otherexamples are intended to be included within the scope of the appendedclaims. Moreover, although the foregoing description and the associateddrawings describe examples of the present disclosure in the context ofcertain illustrative combinations of elements and/or functions, itshould be appreciated that different combinations of elements and/orfunctions may be provided by alternative implementations withoutdeparting from the scope of the appended claims. Accordingly,parenthetical reference numerals in the appended claims are presentedfor illustrative purposes only and are not intended to limit the scopeof the claimed subject matter to the specific examples provided in thepresent disclosure.

The invention claimed is:
 1. A computer vision system, comprising: acamera that captures a plurality of image frames in a target field; aprocessor coupled to the camera, the processor configured to receive theplurality of image frames and detect occupants in the space from theimage frames, assign an ID and a location for each person in a field ofview, an input image or a series of input images are processed by theprocessor for occupant detection and location, and occupants visible inthe image are assigned IDs and locations in the image frame; a userinterface that allows for a determination of a reference objectincluding one or more of: shape, dimensions, and location in the image;a server that calculates the dimensions of the actual space shown in theinput image based on the reference object information, calculatesdistances between any and all: detected occupants, and classifies eachoccupant as being within a determined-area of interest; and wherein inresponse to input images processed by the processor and the dimensionsof the actual space the system detects and tracks animal wellness. 2.The system of claim 1, wherein video feed captured by the camera,relayed to the processing unit for processing and automated analysis isnot stored in the system.
 3. The system of claim 1, wherein the imagesare processed in real time, data regarding the space and its occupantsis extracted, and the next frames of the video overwrite those framesthat were just processed.
 4. The system of claim 1, wherein only thedata extracted from each frame is stored locally and/or relayed to thesystem servers.
 5. The system of claim 1, wherein the system isconfigured to provide a recommendation that is model directed to atleast one of: an interest; and concern of the establishment.
 6. Thesystem of claim 1, wherein the system measures at least one: conditionspost an intervention; and action, and compares an observed result to themodeled result.
 7. The system of claim 1, wherein the system updates amodel selected from at least one of: f machine learning and artificialintelligence.
 8. The system of claim 1, wherein the system is used withat least one establishment selected from: retail; the food industry; andthe beverage industry.
 9. The system of claim 1, wherein the system isused relative to advertising costs of an establishment.
 10. The systemof claim 1, wherein the system provides near real time informationrelative to an establishment's current occupancy and providesinformation selected from at least one of: the ratio of anestablishment's customers to employees; the number of establishmentcustomers compared to establishment inventory; and the number of peoplewho are entering and/or exiting an establishment.
 11. The system ofclaim 1, wherein the system identifies a condition of interest withregard to occupant count, occupant activity, occupant location, occupantratios, and/or some derivative or combination thereof and generatesinformation summarizing the identified condition.
 12. The system ofclaim 1, wherein the system sends out an alert to an establishmentdescribing the identified condition of interest e.g. that theestablishment capacity has dropped below a target capacity.
 13. Thesystem of claim 1, wherein the system detects and tracts animal habitat.14. The system of claim 13, wherein the system detects and tracts animalintervention design.
 15. The system of claim 1, wherein the systemcreates a model of the conditions of an establishment that is informedby historical data, and runs scenarios of known intervention optionsthrough the model to assess intervention options based on their cost,impact, and any other factors of interest to the establishment owner,when current conditions are observed by the system to be of interest orconcern, the system generates an intervention recommendation for theestablishment that is based on modeled outcomes, when a modeledintervention is employed, the system observes the impact of theintervention on the conditions, and if the observed impact is differentthan the modeled impact, the system updates the model based on theobserved data.
 16. The system of claim 15, wherein an observed impact ofthe intervention is compared with a modeled impact of the action, andthen updates the model.
 17. The system of claim 16, wherein the systemsprovide for a continual improvement to the model.
 18. The system ofclaim 1, wherein the system is configured to make one or morerecommendations to a human.
 19. The system of claim 18, wherein thesystem is configured to provide a mechanism by which the human can takethe one or more recommendations or other action.
 20. The system of claim19, wherein the other action that is modeled to best address a conditionof interest to an establishment.